<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>留言板</title>
<style type="text/css">
</style>
<link href="css/lyb.css" rel="stylesheet" type="text/css">
</head>
<body>
	<div id='top'>
		<span id='send'></span>
	</div>
	<div id='main'>
<?php   
include_once "config.php";     

?> 
        </div>

	<div id='send-form'>
            <form action="index.php" name='lyb' method="POST" >
		<p>
        <p>编号：<input type="text" name="id" size="20" /></p>
        <p>标题：<input type="text" name="title" size="20" /></p>
  		<p>留言内容:</p>
  		<p><textarea rows="9" name="info" cols="35"></textarea></p>
        <p><input type="submit" value="提交" name="" /><input type="reset" value="重设" name="" /></p>
		</form>
	</div>
   
 
    <?php 
include_once "handler.php"; 
$sql = "SELECT * FROM  lyb";
$result = $conn->query($sql);

$arrlist = array();

if ($result->num_rows > 0) {  
    // 输出每行数据
    while($row = $result->fetch_assoc()) {
        array_push($arrlist, $row);        
    }
} else {
    echo "0 results";
}


$conn->close();          
           ?>            
<?php
foreach ($arrlist as $vo){
?>

</style>
         

<div style="margin:0px auto;" class="keleyitable"><hr/>
<table>  
<tr><td class="klytd">编号：</td><td class="hvttd"><?php  echo $vo['id']; ?></td></tr>  
<tr><td class="klytd">留言人：</td><td class="hvttd"><?php  echo $vo['title']; ?></td></tr>  
<tr><td class="klytd">留言内容：</td><td class="hvttd"><?php  echo $vo['info']; ?></td></tr>  
</table>    
</div>
<?php    }   ?>
</body>
</html>